Aspire sample application - #556
Conversation
…StorageBlobsProjector - Create new test project following Eventuous.Tests.Azure.ServiceBus structure - Add Testcontainers.Azurite package to Directory.Packages.props - Add IntegrationFixture with Azurite and KurrentDB containers - Test all On method variants (sync/async, state/context) for new and existing blobs - Test concurrent modification scenario (412 Precondition Failed) - Test no handler scenario (returns Ignored) Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…face intent - Add helper methods: SetupContainer, SetupExistingBlob, GetBlobState, AssertSuccess, AssertIgnored - Rename projector classes to surface handler patterns (SyncStateProjector, etc.) - Group tests by handler variant with clear section comments - Test names now follow [Variant]_[Scenario]_[ExpectedBehavior] pattern - Reduce LOC from ~450 to ~330 (-27%) - Remove fixture parameter from CreateContext (unused) Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
…obServiceClient and container name - Add StorageBlobsProjector(BlobServiceClient, string containerName) constructor - Update test helper methods to work with container names instead of BlobContainerClient - Add GetContainer() helper to get BlobContainerClient from fixture - Update all test projector classes with new constructor overload - Update all tests to use fixture.BlobServiceClient with container names Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
PR Summary by QodoAdd Azure Aspire sample and Blob Storage projector with Azurite tests
AI Description
Diagram
High-Level Assessment
Files changed (41)
|
Code Review by Qodo
1.
|
Test Results 46 files + 24 46 suites +24 13m 22s ⏱️ -25s Results for commit 9894409. ± Comparison against base commit 37402bc. This pull request removes 5 and adds 9 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
|
This PR still contains Azure lib changes, I guess those are "stacked" on #550, so I'll wait for it to be merged first. |
|
Hi @quezlatch — first of all, thank you for the work you put into this and #550, and for your patience through the review rounds. The blob storage projection from #550 is merged and released, and your Aspire work here directly shaped what happened next. After looking at this PR, I realized the issue isn't with your implementation — it's that we already maintain two nearly identical Bookings samples (KurrentDB and Postgres), and a third clone under samples/azure would triple the maintenance surface. We've been bitten by exactly that during review: the sample drifted out of sync with API changes (#524, and the #550 cleanup) because samples don't run in CI. So instead of merging a new clone, I've reworked this in #574: the existing KurrentDB sample now gets an Aspire AppHost, with the parts of your work that carried the real value grafted onto it — the AppHost structure, the Scalar API reference wiring, the blob storage projection (now living alongside the Mongo projections on the same subscription, showing multiple projection targets), and the health check plumbing. You're credited via Co-authored-by on the commit. Running it end to end also flushed out several latent bugs in the sample your PR had inherited (missing default serializer, A couple of things from this PR deliberately didn't make it: the Azure SQL event store wiring (the Postgres sample covers the relational-store pattern) and Service Bus messaging (the emulator's SQL backing makes the sample heavy; the KurrentDB-native integration flow already demonstrates the gateway). If you'd like to take a look at #574 or build on it, I'd be glad to have your review there. Closing this one in favor of #574. Thanks again — this was genuinely useful work. |
…tions (#574) * feat(samples): host the KurrentDB Bookings sample in Aspire with blob projections Supersedes #556: instead of adding a third Bookings clone under samples/azure, the existing KurrentDB sample gains an Aspire AppHost and the Azure pieces worth keeping. - Add Bookings.AppHost orchestrating KurrentDB, MongoDB 7.0, the Azurite blob emulator, both services, and a Scalar API reference; service telemetry flows to the Aspire dashboard via OTLP - Add BookingStateBlobProjection: booking state projected to Azure Blob Storage from the same all-stream subscription as the Mongo projections, with ByGlobalPosition idempotency and race retries, exposed via GET /bookings/{id}/view and readable next to the event-store fold - Fix latent Payments sample breakage: set the default event serializer (required since #524), reference the AspNetCore command mapping generator, and bind RecordPayment with HttpCommand<PaymentState> so MapDiscoveredCommands actually maps the route - Add health endpoints and Scalar-compatible OpenAPI document routes to both services; keep fixed ports for standalone runs while letting Aspire assign URLs - Add kurrentdb and azurite services to docker-compose for standalone runs; add a sample README covering both run modes - Pin the sample (and the Spyglass tests that use its apps as fixtures) to net10.0, since Aspire cannot run multi-targeted projects; Spyglass tests move to a net10-only CI step - Verified end to end under Aspire: book, pay via the Payments service, integration events through the gateway, and all three read paths agree Co-authored-by: Quezlatch <quezlatch@gmail.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(samples): review feedback on the blob projection wiring - Run BookingStateBlobProjection on its own subscription with its own checkpoint, so adding it to a system with existing data replays the stream from the beginning and backfills the blobs instead of resuming from the Mongo projections' position (which would also let a later payment event build an incomplete view from a fresh instance) - Create the blob container with the awaited async call at startup Verified live under Aspire: book + pay end to end, blob view and Mongo view agree. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Quezlatch <quezlatch@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
|
@alexeyzimarev thank you for your appreciation :) Eventuous is now a foundational piece for me so it's good to be able to contribute something back! |
Stacked on #550
Aspire Sample
A new sample demonstrates how to use Eventuous in a distributed .NET Aspire application with Azure services.
Aspire CLI, and really an IDE extensionPR prepared with the help of Mistral Vibe.